<?php
class TabComponent extends Component {
	/**
	 * Other components utilized by AuthComponent
	 *
	 * @var array
	 * @access public
	 */
	var $components = array('Session', 'RequestHandler');

	function getTabVerticalLink(){
		$userRole = $this->Session->read('Auth.User.role');
		switch($userRole){
			case 3:
				$tabLink = array(
				array(
					'label' => __('All articles'),
					'link' => array('controller'=> 'articles','action' => 'index'),
				),
				array(
					'label' => __('Accept articles'),
					'link' => array('controller'=> 'articles','action' => 'filter', 'accept'),
				),
				array(
					'label' => __('Reject articles'),
					'link' => array('controller'=> 'articles','action' => 'filter', 'reject'),
				));
				break;
			default:
				$tabLink = array();
		}
		return $tabLink;
	}
}
?>